home *** CD-ROM | disk | FTP | other *** search
/ The CICA Windows Explosion! / The CICA Windows Explosion! - Disc 2.iso / nt / ntunzip2.zip / BUGS.LON next >
Text File  |  1994-01-23  |  18KB  |  388 lines

  1. Bogus bugs (not our fault!):
  2. ---------------------------
  3.  
  4.  By far THE BIGGEST source of bug reports to Info-ZIP/zip-bugs is the
  5.  incorrect transfer of zipfiles (or of the UnZip executable itself).
  6.  ALWAYS TRANSFER IN BINARY MODE!  This includes ftp transfers and *both*
  7.  ends of a Kermit connection ("set file type binary").  If your copy
  8.  isn't exactly the same size as the original, you made a mistake.
  9.  
  10.  Another common source of errors such as "compression method 8 not sup-
  11.  ported" is the existence of an old version of UnZip somewhere in your
  12.  path.  Make sure you're using the version you think you're using; give
  13.  the full path explicitly if necessary.  Executing "unzip" without any
  14.  options will print a help screen, at the top of which is the UnZip
  15.  version number and release date.
  16.  
  17.  
  18. Bugs (real and/or imagined):
  19. ---------------------------
  20.  
  21.  - DEC Ultrix:  on long zipfiles, unzip will sometimes fail (bad CRC, not always
  22.     reproducible); this is apparently due either to a hardware bug (cache mem)
  23.     or OS bug (page faults?) [Igor, Jean-loup, bottom of BUGS.long]
  24.  - Pyramid:  USE_FWRITE causes CRC errors (???) [Kevin]
  25.  - possible problems with unzip -a on binary file in compact-model-MSDOS-Zip-
  26.     created archive? (showed up with MSDOS zip 1.9l and various unzips; inflate
  27.     crashes(?)) [Piet]
  28.  - funzip/more/decryption/no-echo bug:  race condition(?) causes terminal
  29.     to be "reset" to no-echo state
  30.  - directory dates/times (special Unix perms?) not restored
  31.  - Macintosh (100200), Atari (020000) external file attributes not interpreted
  32.     correctly (both unzip and zipinfo)
  33.  - pkbug error:  zipfile with incorrect csize and/or ucsize--check for end of
  34.     compressed (csize) data in uncompression routines:
  35.       unimplod.c:    while ((!zipeof) && ((outpos + outcnt) < ucsize)) {
  36.       unreduce.c:    while (((outpos + outcnt) < ucsize) && (!zipeof)) {
  37.     [James Birdsall, Mark, bottom of BUGS.long]
  38.  - OS/2:  directory EAs not restored if directory exists [Kai Uwe, KG27515@uark]
  39.     (subsequent note:  no way to determine which EAs are newer ==> cannot 
  40.     restore without user input)
  41.  - MS-DOS:  Borland executables don't allow other than 80-column, 25/43/50-line
  42.     screen modes (Borland bug) [Michael Stillwell]
  43.  
  44.  
  45. Features (possible and/or definite):
  46. -----------------------------------
  47.  
  48.  - put man pages in more "proper" nroff format
  49.  - ignore case for internal filename match on non-Unix systems, unless file-
  50.     specs enclosed in single quotes
  51.  - save/extract Unix mtime/ctime/atime/UID/GID info (Unix extra field)
  52.  - modify to decompress input stream if part of a pipe, but continue using
  53.     central directory if not (BIG job!)--extended local header capability
  54.  - add zipinfo option(s) to sort alphabetically, by date/time, in reverse, etc.
  55.  - add "near" to global vars [Steve Salisbury, 92.4.21]
  56.  - modify set_file_time routines to share common code (macro?)
  57.  - when listing filenames, use '?' for non-printables? [Thomas Wolff, 92.6.1]
  58.  - add zipinfo "in-depth" option? (check local vs. central filenames, etc.)
  59.  - create zipcat program to concatenate zipfiles
  60.  - assembly-language routines?
  61.  - VM/CMS version (Walter Moore, Phil Howard, Chua Kong Sian, others)
  62.  - add -oo option (overwrite and override)?  no user queries (if bad password,
  63.     skip file; if disk full, take default action; if VMS special on non-VMS,
  64.     unpack anyway; etc.)
  65.  - add -Q[Q[Q]] option (quiet mode on comments, cautions, warnings and errors)?
  66.     forget -oo, or make synonym?  Default level -Q?
  67.  - add OS/2 .INF format helpfiles for UnZip and ZipInfo?
  68.  
  69.  
  70.  
  71.  
  72. Additional thoughts/reports/arguments/issues (many VMS):
  73. -------------------------------------------------------
  74.  
  75. From: tp@mccall.com (Terry Poot)
  76. Newsgroups: comp.os.vms
  77. Subject: Re: Speeding up VAX C writes
  78. Date: 22 Oct 91 11:48:59 GMT
  79.  
  80. In article <1991Oct21.130745.1018@lsl.co.uk>, paul@lsl.co.uk (Paul Hardy)
  81. writes:
  82. >Some months ago, I remember seeing an item here about how to speed up
  83. >writes from VAX C, in the case where the data being written was binary.
  84.  
  85. Actually, the only trick I know about works no matter what the data is. I'm
  86. talking here about the normal C stream_lf files. You can use other RMS file
  87. types by specifying parameters to fopen, open, or creat, and they may be faster
  88. or slower depending on what you are doing, and how you are doing it. However,
  89. there is a way to speed up most I/O on stream files, in many cases
  90. dramatically.
  91.  
  92. You want to add the argument "mbc=nnn" where nnn is the number of pages of
  93. memory you can spare for I/O buffering. mbc is the RMS field name for the
  94. Multi-Block Count. It tells the C rtl to use a buffer big enough to hold nnn
  95. blocks (blocks are the same size as pages for a little while longer at least,
  96. 512 bytes). Thus rather than reading or writing a block at a time, you can have
  97. it do it 200 blocks at a time, if you can spare 100Kb of memory, or any other
  98. value. (I'm sure there's an upper limit, but I don't know what it is. In
  99. practical terms, for most people it'll probably be PGFLQUO.)
  100.  
  101. BTW, note that I said the C rtl and not RMS. C I/O uses RMS block mode I/O,
  102. which doesn't actually support mbc. It does, however, support whatever buffer
  103. size you choose, as long as it is an integral number of blocks. The designers
  104. of the RTL decided to check for mbc even on normal C stream files and allocate
  105. the buffer size accordingly (Thanks, guys!). This is why specifying mbf, the
  106. multi-buffer size, doesn't do anything. They didn't do multi-buffering, and RMS
  107. doesn't support that either for block mode I/O. (Anyone wanna submit an
  108. enhancement request SPR?)
  109.  
  110. These little tidbits of info are courtesy one of the C RTL developers, from
  111. discussion after a session on C I/O at the DECUS symposium in Las Vegas.
  112.  
  113.  
  114. ------------------------------
  115. From: techentin@Mayo.EDU (Bob Techentin)
  116. Newsgroups: comp.os.vms
  117. Subject: Re: Speeding up VAX C writes
  118.  
  119. Paul Hardy, <paul@lsl.co.uk> asked:
  120.  
  121. >  Some months ago, I remember seeing an item here about how to speed up
  122. >  writes from VAX C, in the case where the data being written was binary.
  123. >
  124. >  We now have an application which is using fopen, then fseek and fwrite,
  125. >  and is taking forever to do the writes. I'm sure that by putting the right
  126. >  magic words in the fopen, we can cut out a lot of the unneccessary work
  127. >  that the C RTL is doing on our behalf.
  128.  
  129. The VAX C RTL function fopen() creates files that are stream-lf by default.  
  130. This is not a natural kind of file for RMS, which prefers record oriented 
  131. structures.  You can use some non-portable options in the fopen() command to 
  132. create record oriented files.   The call:
  133.  
  134.     fp = fopen(filename, access, "ctx=rec");
  135.  
  136. will force the RTL to use record access for read or write - even on a streamlf 
  137. file.  This improves performance significantly.  The call:
  138.  
  139.     fp = fopen(filename, "w", "rfm=var", "rat=cr");
  140.  
  141. will create a variable length record/carriage return carriage control file 
  142. (instead of a stream-lf/no carriage control file), which is what your typical 
  143. text editor creates.  Read and write performance to record structure files is 
  144. even better than just specifying record access.
  145.  
  146. You can use other options documented in the VAX C Run-Time Library Reference 
  147. Manual, creat() function.  We set multibuffer counts, default extensions, and 
  148. read-ahead and write-behind buffering to improve our file performance.
  149.  
  150. Bob Techentin                              Internet: Techentin@Mayo.Edu
  151. Mayo Foundation, Rochester MN, 55905 USA             (507) 284-2702
  152.  
  153.  
  154. ------------------------------
  155. Date: Sun, 12 May 91 11:30:40 PDT
  156. From: madler@cobalt.cco.caltech.edu (Mark Adler)
  157.  
  158. James Birdsall cautions:
  159.  
  160. >>    Warning! Do NOT trust PKUNZIP -t. I have a ZIP file which is badly
  161. >> corrupted -- missing about 25K from the end. PKUNZIP -t claims it is OK.
  162.  
  163. Rather alarming.  It is a problem, but it's not as bad as it sounds
  164. initially.
  165.  
  166. I took a look at his zoo201.zip (which has the single entry zoo201.tar)
  167. and here's what I found:
  168.  
  169. 1. Unzip fails with a crc error.
  170. 2. PKUNZIP succeeds, but the resulting file is too short (444416
  171.    compared to the 532480 reported in the zip file).
  172. 3. If I PKZIP that 444416 byte file, I get exactly zoo201.zip back.
  173.    (Except the length entries are 444416 in the local and central
  174.    headers--a total difference of four bytes between the two.)
  175. 4. Unzip thinks that new zip file is ok.
  176. 5. 444416 is multiple of 2048.
  177.  
  178. Conclusions:
  179.  
  180. 1. What's "wrong" in zoo201.zip is the length, not the data.
  181. 2. PKUNZIP doesn't notice this, since it is driven by the compressed
  182.    "size" and not the uncompressed "length".
  183. 3. Unzip *does* notice because it is (apparently) driven by the
  184.    length, and not the size.  (I haven't looked into this yet.)
  185. 4. What must have happened is that there was an error reading the
  186.    original 532480 byte file at the 444417th byte (probably the
  187.    869th 512-byte sector), but PKZIP thought is was just the end of
  188.    file and stopped compressing.
  189.  
  190. Bugs:
  191.  
  192. 1. PKZIP doesn't handle read errors properly, and doesn't check the
  193.    number of bytes read against the size of the file.  (This is not
  194.    a problem with Zip by the way, since it does look for read errors,
  195.    and it sets the length from the number of bytes actually read from
  196.    the file.)
  197. 2. PKUNZIP never looks at the length to see if it decompressed the
  198.    right number of bytes--it only cares if the CRC is right.
  199. 3. Unzip doesn't stop when it runs out of compressed data (otherwise
  200.    it would have gotten the right CRC, as it did with the re-PKZIPped
  201.    version).  Both PKUNZIP and Unzip should only decompress "size"
  202.    bytes and check that "length" bytes were generated.
  203.  
  204. Mark Adler
  205. madler@pooh.caltech.edu
  206.  
  207.  
  208. ------------------------------
  209. Date: Sun, 12 May 91 13:57:15 PDT
  210. From: jwbirdsa@amc.com (James Birdsall)
  211.  
  212. The compressed size is accurate -- for
  213. the amount of data that was included. The uncompressed size is accurate for
  214. the original file. ...
  215.  
  216.    I hypothesize that PKZIP, when creating the bad file, got a premature
  217. EOF when reading the source (which was one big tar file on an NFS-mounted
  218. drive). Assuming it was done, it proceded to button up the file as though
  219.  
  220.  
  221. ------------------------------
  222. From stevesa@microsoft.com Tue Apr 21 20:28:05 1992
  223. To: jloup@chorus.fr
  224. Cc: zip-bugs@CS.UCLA.EDU
  225. Subject: Re: UNZIP suggestion (Buffer Size flexibility)
  226. Date: Tue, 21 Apr 92 17:26:43 PDT
  227.  
  228. Also, Jean-loup added the "near" keyword to all of ZIP 1.6's global variables
  229. (both the extern declarations and the actual definitions) which causes better
  230. code generation for Microsoft C in compact model.  Shouldn't we do the same
  231. for UNZIP 5.X?
  232.  
  233.  
  234. ------------------------------
  235. Date: Wed, 18 Mar 92 06:57:28 PST
  236. From: madler@cco.caltech.edu (Mark Adler)
  237. To: zip-bugs@CS.UCLA.EDU
  238. Subject: Re: yet another zip format extension
  239.  
  240. As for other one-pass implementation details, I have given a
  241. little thought to that.  Unzip should write an auxilary file as
  242. it's unzipping containing enough information to go back and
  243. change attributes, file names, and possibly do some file
  244. conversions, upon encountering the central directory.  I'm
  245. figuring that it can just write all the entries to temporary file
  246. names at the base of where it's supposed to unzip to (or a
  247. specified temporary area), and then move, chmod, or convert files
  248. to where and what they're supposed to be later.  When you get to
  249. the central directory, you start reading the auxilary file for
  250. the temporary names.  We can also use the good old tempf routines
  251. to avoid writing small auxilary files.
  252.  
  253.  
  254. ------------------------------
  255. From: pdh@netcom.com (Phil Howard )
  256. Newsgroups: comp.compression
  257. Subject: Re: Wanted: ZIP on VM/CMS
  258. Date: 20 May 92 22:31:24 GMT
  259. Organization: Netcom - Online Communication Services  (408 241-9760 guest)
  260.  
  261. lmfken@lmf.ericsson.se (Kenneth Osterberg) writes:
  262.  
  263. >The subject says it all. Has anybody ported InfoZIP (both compression
  264. >and decompression) to the VM/CMS environment? Any estimates on the
  265. >work involved doing this?
  266.  
  267. One of the problems is how to represent a byte-stream or byte-array
  268. file on VM/CMS.  The conventional way is to store arbitrary sized
  269. pieces of the byte stream as individual variable length records in
  270. a type "V" file.  The record boundaries are arbitrary amd reconstruction
  271. of the original stream is done simply by ignoring those boundaries.
  272.  
  273. This is the way Kermit and FTP usually transfer data in binary mode.
  274.  
  275. However it takes 2 bytes of allocated and addressable CMS file space
  276. to store those boundaries.  Since the lengths are arbitrary, it is not
  277. possible to randomly address a specific byte of the stream itself,
  278. since you really have no way of knowing how many record boundaries
  279. preceed "stream byte N".  You would need to know that to know what
  280. record number that byte is in.
  281.  
  282. You could read the "V" file sequentially, but this is very inefficient
  283. and certainly to be avoided.
  284.  
  285. The other method of representing a byte-stream or byte-array file is
  286. to use a type "F" file (fixed length records) with a record length
  287. of exactly 1.  However there are disadvantages to this as well:
  288.  
  289. 1.  Even though Kermit and FTP can create and handle these files, it is
  290.     not the default.
  291.  
  292. 2.  Many CMS tools read and write files 1 record at a time (instead of
  293.     the more sophisticated and version sensitive method of reading
  294.     and writing many records or whole blocks).  This makes handling of
  295.     such files very slow.  Unzipping a 1 megabyte file might take 30
  296.     seconds whereas copying it to another minidisk could take 30 minutes.
  297.  
  298. 3.  Transferring such files across networks tends to expand on the space
  299.     requirements.  While in transit between VM/CMS systems, such files
  300.     may take up to 3 times the normal space, apparently depending on the
  301.     version of RSCS.
  302.  
  303. 4.  Possibly no or poor support in systems like IBM TSO and DEC VMS.
  304.     I have in the past sent such files to a VMS host, which proceeded
  305.     to store them internally with a CR/LF between each byte (it thought
  306.     they were records) including deleting the bytes with values of
  307.     either 0x40 (EBCDIC space) or 0x0d (CR).  This resulted in an
  308.     ambiguity making the original not reconstructable even if one were
  309.     to write a tool to attempt it.
  310.  
  311. Other representation ideas include:
  312.  
  313. 1.  Use larger fixed length records, with the byte count filled in as
  314.     the first 4 bytes of the first block, or the first 4 bytes of the
  315.     last block, or the last 4 bytes of the last block (block being the
  316.     chosen and agreed on fixed record size, not the DASD blocksize).
  317.  
  318. 2.  Agree on a non-arbitrary record length for the type "V" representation
  319.     originally described.
  320.  
  321. Both of the above ideas would require changes to things like Kermit and
  322. FTP in order to support representing byte-stream data in that way.  This
  323. would require convincing IBM in one case.
  324.  
  325. Further complications to porting ZIP to VM/CMS include many aspects of
  326. the different character code in use (EBCDIC) and what to do with the
  327. files being added or extracted.  One already sees the minor problem of
  328. extracting a text file from a ZIP archive on UNIX to find that it has
  329. these nasty carriage return thingys that stick "^M" on the end of all
  330. the lines when using the "less" program.  It gets worse, MUCH worse,
  331. when dealing with VM/CMS (and I am sure TSO would be worse that CMS).
  332.  
  333. I originally offered to port it, but because of the large amount of work
  334. it would require, and that at the time someone else had offered to do so,
  335. and that I didn't (and still don't) have a C compiler I feel I can work
  336. with (I really was considering translating it all to 370 assembler, which
  337. is a language I can program in as fast as, or faster than, C).  Since
  338. there is no hint of a VM/CMS version of ZIP I suspect the other person
  339. gave up as well.  I wouldn't blame them for it.
  340.  
  341. A version of ARC was ported to VM/CMS.  It required the archive be stored
  342. in a "F 512" file and it produced "F 512" files.  Apparently it was ported
  343. from the CP/M version.  I've used it (a program called "VMARC" is something
  344. else).
  345.  
  346. ------------------------------
  347.  
  348. From tsb@admintec.no Fri Jan 29 01:01:08 1993
  349. Subject: Re: bug? in unzip 5.0p1 for VMS: "+" i directories
  350. Date: Fri, 29 Jan 1993 07:51:16 +0100 (MET)
  351.  
  352. [One small _detail_: Now it says, for example, "Creating plus+plus/, 
  353. Inflating [.plus_plus]file...". As you can see there's a cosmetic "bug" when 
  354. unzip displays the name, because after the patch, it is plus_plus thats created.
  355. It's really no problem, but you might want to fix it before the next release?]
  356.  
  357. Terje Sten Bjerkseth <tsb@admintec.no>
  358.  
  359. ------------------------------
  360.  
  361. From: Jean-loup Gailly <jloup@chorus.fr>
  362. Subject: non deterministic (g)unzip on Dec Ultrix
  363. Date: Wed, 19 Jan 94 10:09:11 +0100
  364.  
  365. > We have several DECstations with Ultrix. On *one* of these DECstations
  366. > unzip will not extract some files from long enaugh zipfiles. It
  367. > reports bad CRC.  This effect is not always reproducable. Sometimes
  368. > after first unsuccessfull attempt the second one will be OK.
  369.  
  370. The exact same thing is documented in the gzip INSTALL file:
  371.  
  372. - On Mips Dec Ultrix, gunzip behaves non-deterministically with regard
  373.   to some .gz files. The same command either succeeds or gives a CRC error.
  374.   This problem is still being investigated. The files produced by gzip
  375.   are correct (can reliably be extracted on other systems).
  376.  
  377. We tried using -DNOMEMCPY, and this made the problem even worse. We
  378. reached the conclusion that there is indeed a hardware bug, probably
  379. in the memory cache. But this may also be a bug in the OS (bad
  380. handling of page faults?) because another user of Ultrix with a
  381. different OS version could not reproduce the problem.
  382.  
  383. ------------------------------
  384.  
  385.  
  386. ------------------------------
  387. ------------------------------
  388.